#ifndef GSOAPSERVER_ROS_H
#define GSOAPSERVER_ROS_H

//#include "gsoapapi.h"
#include "../gSoapFoundation/rosgsoapnamespaceH.h"
#include <pthread.h>

#define BACKLOG 100
#define MAX_THREAD 5        //暂时统一开五个

//#define MAX_THREAD_CTRL 2
#define MAX_QUEUE 1000

class GsoapServerForRos
{
public:
    GsoapServerForRos();
    ~GsoapServerForRos();

    bool startServer(int port);
    bool startServerCtrl(int port);
    void loopRecvServer();
    void loopRecvServerCtrl();
    void quitServer();
    void quitServerCtrl();

    soap recieveSoap;
    soap *recieveSoapThread[MAX_THREAD];
    pthread_t tid[MAX_THREAD];

    soap recieveSoapCtrl;
    soap *recieveSoapCtrlThread[MAX_THREAD];
    pthread_t tidCtrl[MAX_THREAD];
};

#endif // GSOAPSERVER_H
